package cn.ulc.socket.admin.controller;

import cn.ulc.common.util.Result;
import cn.ulc.socket.admin.model.dto.staff.BillDetailDTO;
import cn.ulc.socket.admin.model.dto.staff.BillListDTO;
import cn.ulc.socket.admin.service.staff.StaffDeductBillServ;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.Min;

/*
*
* gen controller 2019-06-15
*/
@Validated
@RestController
@RequestMapping("/bills")
public class StaffDeductBillCtrl {

    @Autowired
    StaffDeductBillServ billServ;

    @GetMapping("/rider/list")
    public Result findRiderBillList(@Validated @Min(1) Long riderId,String month,Integer year,String type){
        BillListDTO dto = billServ.findRiderBillList(riderId,month,year,type);
        return Result.success(dto);
    }
    @GetMapping("/rider/detail")
    public Result findRiderBillDetail(String beginDate, String endDate){
        BillDetailDTO dto = billServ.findRiderBillDetail(beginDate,endDate);
        return Result.success(dto);
    }

}
